<!DOCTYPE html>
<html lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>GCC 4.0 Release Series &mdash; Changes, New Features, and Fixes</title>
<link rel="stylesheet" type="text/css" href="https://gcc.gnu.org/gcc.css" />
</head>

<!-- GCC maintainers, please do not hesitate to update/contribute entries
     concerning those part of GCC you maintain!  2002-03-23, Gerald.
-->

<body>
<h1>GCC 4.0 Release Series<br />Changes, New Features, and Fixes</h1>

<p>The latest release in the 4.0 release series is
<a href="#4.0.4">GCC 4.0.4</a>.</p>

<h2>Caveats</h2>

  <ul>
    <li>GCC now generates location lists by default when compiling with debug
	info and optimization.
	<ul>
	  <li>GDB 6.0 and older crashes when it sees location lists.
	      GDB 6.1 or later is needed to debug binaries containing location
	      lists.</li>
	  <li>When you are trying to view a value of a variable in a part of
	      a function where it has no location (for example when the variable
	      is no longer used and thus its location was used for something
	      else) GDB will say that it is not available.</li>
	</ul>
	You can disable generating location lists by
	<code>-fno-var-tracking</code>.</li>
    <li>GCC no longer accepts the <code>-fwritable-strings</code>
        option.  Use named character arrays when you need a writable
        string.</li>
    <li>The options <code>-freduce-all-givs</code> and
        <code>-fmove-all-movables</code> have been discontinued.  They
        were used to circumvent a shortcoming in the heuristics of the
        old loop optimization code with respect to common Fortran constructs.
        The new (tree) loop optimizer works differently and doesn't need those
        work-arounds.</li>
    <li>The graph-coloring register allocator, formerly enabled by the option
	<code>-fnew-ra</code>, has been discontinued.</li>
    <li><code>-I-</code> has been deprecated.  <code>-iquote</code> is meant
        to replace the need for this option.</li>
    <li>The MIPS <code>-membedded-pic</code> and <code>-mrnames</code>
        options have been removed.</li>
    <li>All MIPS targets now require the GNU assembler.  In particular,
        IRIX configurations can no longer use the MIPSpro assemblers,
        although they do still support the MIPSpro linkers.</li>
    <li>The SPARC option <code>-mflat</code> has been removed.</li>
    <li>English-language diagnostic messages will now use Unicode
	quotation marks in UTF-8 locales.  (Non-English messages
	already used the quotes appropriate for the language in
	previous releases.)  If your terminal does not support UTF-8
	but you are using a UTF-8 locale (such locales are the default
	on many GNU/Linux systems) then you should set
	<code>LC_CTYPE=C</code> in the environment to disable that
	locale.  Programs that parse diagnostics and expect plain
	ASCII English-language messages should set
	<code>LC_ALL=C</code>.  See <a
	href="https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html">Markus
	Kuhn's explanation of Unicode quotation marks</a> for more
	information.</li>
   <li>The <code>specs</code> file is no longer installed on most
	platforms.  Most users will be totally unaffected.  However,
	if you are accustomed to editing the specs file yourself, you
	will now have to use the <code>-dumpspecs</code> option to
	generate the specs file, and then edit the resulting file.</li>
  </ul>

<h2>General Optimizer Improvements</h2>

  <ul>
    <li>
        The <a href="../projects/tree-ssa/">tree ssa</a>
        branch has been merged.  This merge has brought in a completely
        new optimization framework based on a higher level intermediate
        representation than the existing RTL representation.  Numerous
        new code transformations based on the new framework are available
        in GCC 4.0, including:<br />

        <ul>
          <li>Scalar replacement of aggregates</li>
          <li>Constant propagation</li>
          <li>Value range propagation</li>
          <li>Partial redundancy elimination</li>
          <li>Load and store motion</li>
          <li>Strength reduction</li>
          <li>Dead store elimination</li>
          <li>Dead and unreachable code elimination</li>
          <li><a href="../projects/tree-ssa/vectorization.html">Autovectorization</a></li>
          <li>Loop interchange</li>
          <li>Tail recursion by accumulation</li>
        </ul><br />

        Many of these passes outperform their counterparts from previous
        GCC releases.
    </li>
    <li><a href="../news/sms.html">Swing Modulo Scheduling (SMS).</a>
	An RTL level instruction scheduling optimization intended for
	loops that perform heavy computations.
    </li>
  </ul>

<h2>New Languages and Language specific improvements</h2>

<h3>C family</h3>

  <ul>
    <li>The <code>sentinel</code> attribute has been added to GCC.
        This function attribute allows GCC to warn when variadic
        functions such as <code>execl</code> are not <code>NULL</code>
        terminated.  See the GCC manual for a complete description of
        its behavior.</li>
    <li>Given <code>__attribute__((alias("target")))</code> it is now
        an error if <code>target</code> is not a symbol, defined in the
        same translation unit.  This also applies to aliases created by
        <code>#pragma weak alias=target</code>.  This is because it's
        meaningless to define an alias to an undefined symbol.  On
        Solaris, the native assembler would have caught this error,
        but GNU as does not.</li>
  </ul>

<h3>C and Objective-C</h3>

  <ul>
    <li>The <code>-Wstrict-aliasing=2</code> option has been added.  This
        warning catches all unsafe cases, but it may also give a warning for
        some cases that are safe.</li>
    <li>The cast-as-lvalue, conditional-expression-as-lvalue and
        compound-expression-as-lvalue extensions, which were
        deprecated in 3.3.4 and 3.4, have been removed.</li>
    <li>The <code>-fwritable-strings</code> option, which was
        deprecated in 3.4, has been removed.</li>
    <li><code>#pragma pack()</code> semantics have been brought closer to
        those used by other compilers. This also applies to C++.</li>
    <li>Taking the address of a variable with <code>register</code>
        storage is invalid in C.  GCC now issues an error instead of a
        warning.</li>
    <li>Arrays of incomplete element type are invalid in C.  GCC now
        issues an error for such arrays.  Declarations such as
        <code>extern struct s x[];</code> (where <code>struct s</code>
        has not been defined) can be moved after the definition of
        <code>struct s</code>.  Function parameters declared as
        arrays of incomplete type can instead be declared as pointers.</li>
  </ul>

<h3>C++</h3>

  <ul>
    <li>When compiling without optimizations (<code>-O0</code>), the C++
        front end is <em>much</em> faster than in any previous
        versions of GCC. Independent testers have measured speed-ups up to
        25% in real-world production code, compared to the 3.4 family (which
        was already the fastest version to date). Upgrading from older
        versions might show even bigger improvements.</li>
    <li>ELF visibility attributes can now be applied to a class type,
        so that it affects every member function of a class at once,
        without having to specify each individually:
        <pre>class __attribute__ ((visibility(&quot;hidden&quot;))) Foo
{
   int foo1();
   void foo2();
};</pre>The syntax is deliberately similar to the <code>__declspec()</code>
        system used by Microsoft Windows based compilers, allowing
        cross-platform projects to easily reuse their existing macro system for
        denoting exports and imports. By explicitly marking internal classes
        never used outside a binary as hidden, one can completely avoid PLT
        indirection overheads during their usage by the compiler. You can find
        out more about the advantages of this at <a
        href="https://www.akkadia.org/drepper/dsohowto.pdf">
        https://www.akkadia.org/drepper/dsohowto.pdf</a></li>

    <li>The <code>-fvisibility-inlines-hidden</code> option has been added
        which marks all inlineable functions as having hidden ELF visibility,
        thus removing their symbol and typeinfo from the exported symbol table
        of the output ELF binary. Using this option can reduce the exported
        symbol count of template-heavy code by up to 40% with no code change
        at all, thus notably improving link and load times for the binary as
        well as a reduction in size of up to 10%. Also, check the new
        <a href="#visibility"><code>-fvisibility</code> option</a>.</li>

    <li>The compiler now uses the library interface specified by the <a
        href="https://itanium-cxx-abi.github.io/cxx-abi/">C++ ABI</a> for
        thread-safe initialization of function-scope static variables.
        Most users should leave this alone, but embedded programmers may
        want to disable this by specifying
        <code>-fno-threadsafe-statics</code> for a small savings in code
        size.</li>

    <li>Taking the address of an explicit register variable is no
        longer supported.  Note that C++ allows taking the address of
        variables with <code>register</code> storage so this will
        continue to compile with a warning.  For example, assuming
        that <code>r0</code> is a machine register:
        <pre>register int foo asm ("r0");
register int bar;
&amp;foo; // error, no longer accepted
&amp;bar; // OK, with a warning</pre></li>

    <li>G++ has an undocumented extension to virtual function
	covariancy rules that allowed the overrider to return a type
	that was implicitly convertable to the overridden function's
	return type.   For instance a function returning <code>void
	*</code> could be overridden by a function returning
	<code>T *</code>.  This is now deprecated and will be removed in
	a future release.</li>
 
    <li>The G++ minimum and maximum operators (<code>&lt;?</code> and
        <code>&gt;?</code>) and their compound forms
        (<code>&lt;?=</code>) and <code>&gt;?=</code>) have been
        deprecated and will be removed in a future version.  Code
        using these operators should be modified to use
        <code>std::min</code> and <code>std::max</code> instead.</li>

    <li>Declaration of nested classes of class templates as friends are
	supported:
	<pre>template &lt;typename T&gt; struct A {
  class B {};
};
class C {
  template &lt;typename T&gt; friend class A&lt;T&gt;::B;
};</pre>
	This complements the feature member functions of class templates
	as friends introduced in GCC 3.4.0.</li>

    <li>When declaring a friend class using an unqualified name,
	classes outside the innermost non-class scope are not searched:
	<pre>class A;
namespace N {
  class B {
    friend class A;   // Refer to N::A which has not been declared yet
                      // because name outside namespace N are not searched
    friend class ::A; // Refer to ::A
  };
}</pre>
	Hiding the friend name until declaration is still not implemented.</li>

    <li>Friends of classes defined outside their namespace are correctly
	handled:
	<pre>namespace N {
  class A;
}
class N::A {
  friend class B; // Refer to N::B in GCC 4.0.0
                  // but ::B in earlier versions of GCC
};</pre></li>
  </ul>

<h4>Runtime Library (libstdc++)</h4>

  <ul>
    <li>Optimization work:
      <ul>
        <li>Added efficient specializations of <code>istream</code> functions
	for <code>char</code> and <code>wchar_t</code>.</li>
	<li>Further performance tuning of <code>strings</code>, in particular
	wrt single-char <code>append</code> and <code>getline</code>.</li>
	<li><code>iter_swap</code> - and therefore most of the mutating 
	algorithms - now makes an unqualified call to <code>swap</code> when
	the <code>value_type</code> of the two iterators is the same.</li>
      </ul></li>
    <li>A large subset of the features in Technical Report 1 (TR1 for short)
    is <strong>experimentally</strong> delivered (i.e., no guarantees about
    the implementation are provided. In particular it is not promised that the
    library will remain link-compatible when code using TR1 is used):
      <ul>
        <li>General utilities such as <code>reference_wrapper</code> and
	<code>shared_ptr</code>.</li>
	<li>Function objects, i.e., <code>result_of</code>, <code>mem_fn</code>,
	<code>bind</code>, <code>function</code>.</li>
	<li>Support for metaprogramming.</li>
	<li>New containers such as <code>tuple</code>, <code>array</code>,
	<code>unordered_set</code>, <code>unordered_map</code>,
	<code>unordered_multiset</code>, <code>unordered_multimap</code>.</li>
      </ul></li>
     <li>As usual, many bugs have been fixed and LWG resolutions implemented
     for the first time (e.g., DR 409).</li>
  </ul>

<h3>Java</h3>

  <ul>
    <li>In order to prevent naming conflicts with other implementations
        of these tools, some GCJ binaries have been renamed:
	<ul>
	  <li><code>rmic</code> is now <code>grmic</code>,</li>
	  <li><code>rmiregistry</code> is now <code>grmiregistry</code>,
              and</li>
	  <li><code>jar</code> is now <code>fastjar</code>.</li>
	</ul>
	In particular, these names were problematic for the jpackage.org
        packaging conventions which install symlinks in <code>/usr/bin</code>
        that point to the preferred versions of these tools.
    </li>

    <li>The <code>-findirect-dispatch</code> argument to the compiler
      now works and generates code following a new "binary
      compatibility" ABI.  Code compiled this way follows the binary
      compatibility rules of the Java Language Specification.
    </li>

    <li>libgcj now has support for using GCJ as a JIT, using
      the <code>gnu.gcj.jit</code> family of system properties.
    </li>

    <li>libgcj can now find a shared library corresponding to the
      bytecode representation of a class.  See the documentation for
      the new <code>gcj-dbtool</code> program, and the
      new <code>gnu.gcj.precompiled.db.path</code> system property.
    </li>

    <li>There have been many improvements to the class library.  Here
      are some highlights:
      <ul>
	<li>Much more of AWT and Swing exist.
	</li>

	<li>Many new packages and classes were added,
	  including <code>java.util.regex</code>, <code>java.net.URI</code>,
	  <code>javax.crypto</code>,
	  <code>javax.crypto.interfaces</code>, <code>javax.crypto.spec</code>,
	  <code>javax.net</code>, <code>javax.net.ssl</code>,
	  <code>javax.security.auth</code>,
	  <code>javax.security.auth.callback</code>,
	  <code>javax.security.auth.login</code>,
	  <code>javax.security.auth.x500</code>,
	  <code>javax.security.sasl</code>,
	  <code>org.ietf.jgss</code>,
	  <code>javax.imageio</code>,
	  <code>javax.imageio.event</code>,
	  <code>javax.imageio.spi</code>,
	  <code>javax.print</code>,
	  <code>javax.print.attribute</code>,
	  <code>javax.print.attribute.standard</code>,
	  <code>javax.print.event</code>, and
	  <code>javax.xml</code>
	</li>
	<li>Updated SAX and DOM, and imported GNU JAXP </li>
      </ul>
    </li>

  </ul>

<h3>Fortran</h3>

  <ul>
    <li>A new <a href="../fortran/">Fortran</a> front end
        has replaced the aging GNU Fortran 77 front end.  The new front end
        supports Fortran 90 and Fortran 95.  It may not yet be as stable as
        the old Fortran front end.
    </li>
  </ul> 

<h3>Ada</h3>

  <ul>
    <li>Ada (with tasking and Zero Cost Exceptions) is now available on many
        more targets, including but not limited to: alpha-linux, hppa-hpux, 
        hppa-linux, powerpc-darwin, powerpc-linux, s390-linux, s390x-linux,
        sparc-linux.
    </li>
    <li>Some of the new Ada 2005 features are now implemented like 
        <code>Wide_Wide_Character</code> and <code>Ada.Containers</code>.
    </li>
    <li>Many bugs have been fixed, tools and documentation improved.</li>
    <li>To compile Ada from the sources, install an older working Ada compiler 
        and then use <code>--enable-languages=ada</code> at configuration time, 
        since the Ada front end is not currently activated by default. See
        the <a href="https://gcc.gnu.org/install/">Installing GCC</a>
        for details.
    </li>
  </ul> 

<h2 id="targets">New Targets and Target Specific Improvements</h2>

<h3>H8/300</h3>
  <ul>
    <li>The frame layout has changed.  In the new layout, the prologue
    of a function first saves registers and then allocate space for
    locals, resulting in an 1% improvement on code size.</li>
  </ul>

<h3>IA-32/x86-64 (AMD64)</h3>
  <ul>
    <li>The <code>acos</code>, <code>asin</code>, <code>drem</code>,
        <code>exp10</code>, <code>exp2</code>, <code>expm1</code>,
        <code>fmod</code>, <code>ilogb</code>, <code>log10</code>,
        <code>log1p</code>, <code>log2</code>, <code>logb</code> and
        <code>tan</code> mathematical builtins (and their float and long
        double variants) are now implemented as inline x87 intrinsics
        when using <code>-ffast-math</code>.</li>

    <li>The <code>ceil</code>, <code>floor</code>, <code>nearbyint</code>,
	<code>rint</code> and <code>trunc</code> mathematical builtins
	(and their float and long double variants) are now implemented as
	inline x87 intrinsics when using <code>-ffast-math</code>.</li>

    <li>The x87's <code>fsincos</code> instruction is now used automatically
        with <code>-ffast-math</code> when calculating both the sin and cos
        of the same argument.</li>

    <li>Instruction selection for multiplication and division by constants
        has been improved.</li>
  </ul>

<h3>IA-64</h3>
  <ul>
    <li>Floating point division, integer division and <code>sqrt</code>
        are now inlined, resulting in significant performance improvements
        on some codes.</li>
  </ul>

<h3>MIPS</h3>
  <ul>
    <li>Division by zero checks now use conditional traps if the target
        processor supports them.  This decreases code size by one word per
        division operation.  The old behavior (branch and break) can
        be obtained either at configure time by passing
        <code>--with-divide=breaks</code> to <code>configure</code> or at
        runtime by passing <code>-mdivide-breaks</code> to GCC.</li>
    <li>Support for MIPS64 paired-single instructions has been added.
        It is enabled by <code>-mpaired-single</code> and can be accessed
        using both the target-independent vector extensions and new
        MIPS-specific built-in functions.</li>
    <li>Support for the MIPS-3D ASE has been added.  It is enabled by
        <code>-mips3d</code> and provides new MIPS-3D-specific
        built-in functions.</li>
    <li>The <code>-mexplicit-relocs</code> option now supports static
        n64 code (as is used, for example, in 64-bit linux kernels).
        <code>-mexplicit-relocs</code> should now be feature-complete
        and is enabled by default when GCC is configured to use a
        compatible assembler.</li>
    <li>Support for the NEC VR4130 series has been added.  This support
        includes the use of VR-specific instructions and a new VR4130
        scheduler.  Full VR4130 support can be selected with
        <code>-march=vr4130</code> while code for any ISA can be tuned
        for the VR4130 using <code>-mtune=vr4130</code>.  There is also
        a new <code>-mvr4130-align</code> option that produces better
        schedules at the cost of increased code size.</li>
    <li>Support for the Broadcom SB-1 has been extended.  There is now
        an SB-1 scheduler as well as support for the SB-1-specific
        paired-single instructions.  Full SB-1 support can be selected with
        <code>-march=sb1</code> while code for any ISA can be optimized
        for the SB-1 using <code>-mtune=sb1</code>.</li>
    <li>The compiler can now work around errata in R4000, R4400,
        VR4120 and VR4130 processors.  These workarounds are enabled by
        <code>-mfix-r4000</code>, <code>-mfix-r4400</code>,
        <code>-mfix-vr4120</code> and <code>-mfix-vr4130</code>
        respectively.  The VR4120 and VR4130 workarounds need binutils
        2.16 or above.</li>
    <li>IRIX shared libraries are now installed into the standard
        library directories: o32 libraries go into <code>lib/</code>,
        n32 libraries go into <code>lib32/</code> and n64 libraries
        go into <code>lib64/</code>.</li>
    <li>The compiler supports a new <code>-msym32</code> option.
        It can be used to optimize n64 code in which all symbols
        are known to have 32-bit values.</li>
  </ul>

<h3>S/390 and zSeries</h3>
  <ul>
    <li>New command-line options help to generate code intended to
	run in an environment where stack space is restricted,
	e.g. Linux kernel code:
	<ul>
	  <li><code>-mwarn-framesize</code> and
	      <code>-mwarn-dynamicstack</code> trigger compile-time
	      warnings for single functions that require large or
	      dynamic stack frames.</li>
	  <li><code>-mstack-size</code> and <code>-mstack-guard</code>
	      generate code that checks for stack overflow at run time.</li>
	  <li><code>-mpacked-stack</code> generates code that reduces
	      the stack frame size of many functions by reusing unneeded
	      parts of the stack bias area.</li>
	</ul></li>
    <li>The <code>-msoft-float</code> option now ensures that generated
	code never accesses floating point registers.</li>
    <li>The <code>s390x-ibm-tpf</code> target now fully supports C++,
	including exceptions and threads.</li>
    <li>Various changes to improve performance of the generated code
	have been implemented, including:
	<ul>
	  <li>GCC now uses sibling calls where possible.</li>
	  <li>Condition code handling has been optimized, allowing GCC
	      to omit redundant comparisons in certain cases.</li>
	  <li>The cost function guiding many optimizations has been
	      refined to more accurately represent the z900 and z990
	      processors.</li>
	  <li>The <code>ADD LOGICAL WITH CARRY</code> and <code>SUBTRACT
	      LOGICAL WITH BORROW</code> instructions are now used to
	      avoid conditional branches in certain cases.</li>
	  <li>The back end now uses the <code>LEGITIMIZE_RELOAD_ADDRESS</code>
	      feature to optimize address arithmetic required to access large
	      stack frames.</li>
	  <li>GCC now makes more efficient use of memory-to-memory type
	      instructions (<code>MVC</code>, <code>CLC</code>, ...).</li>
	  <li>More precise tracking of special register use allows better
	      instruction scheduling, in particular of the function 
	      prologue and epilogue sequences.</li>
	  <li>The Java front end now generates inline code to implement
	      integer division, instead of calling library routines.</li>
	</ul></li>
  </ul>

<h3>SPARC</h3>
  <ul>
    <li>The options <code>-mv8</code>, <code>-msparclite</code>,
        <code>-mcypress</code>, <code>-msupersparc</code>,
        <code>-mf930</code> and <code>-mf934</code> have been removed.
        They have been replaced with <code>-mcpu=xxx</code>.</li>
    <li>The internal model used to estimate the relative cost of each
        instruction has been updated.  It is expected to give better
        results on recent UltraSPARC processors.</li>
    <li>Code generation for function prologues and epilogues has been
        improved, resulting in better scheduling and allowing multiple
        exit points in functions.</li>
    <li>Support for Sun's Visual Instruction Set (VIS) has been enhanced.
        It is enabled by <code>-mvis</code> and provides new built-in functions
        for VIS instructions on UltraSPARC processors.</li>
    <li>The option <code>-mapp-regs</code> has been turned on by default on
        Solaris too.</li>
  </ul>

<h3>NetWare</h3>
  <ul>
    <li>Novell NetWare (on ix86, no other hardware platform was ever
        really supported by this OS) has been re-enabled and the ABI
        supported by GCC has been brought into sync with that of MetroWerks
        CodeWarrior (the ABI previously supported was that of some Unix
        systems, which NetWare never tried to support).</li>
  </ul>

<h2 id="obsolete_systems">Obsolete Systems</h2>

  <p>Support for a number of older systems has been declared obsolete in
  GCC 4.0.  Unless there is activity to revive them, the next release of
  GCC will have their sources permanently <strong>removed</strong>.</p>

  <p>All GCC ports for the following processor architectures have been
  declared obsolete:</p>

  <ul>
    <li>Intel i860</li>
    <li>Ubicom IP2022</li>
    <li>National Semiconductor NS32K (ns32k)</li>
    <li>Texas Instruments TMS320C[34]x</li>
  </ul>

  <p>Also, those for some individual systems have been obsoleted:</p>

  <ul>
    <li>SPARC family
      <ul>
        <li>SPARClite-based systems (<code>sparclite-*-coff</code>,
            <code>sparclite-*-elf</code>, <code>sparc86x-*-elf</code>)</li>
        <li>OpenBSD 32-bit (<code>sparc-*-openbsd*</code>)</li>
      </ul></li>
  </ul>

<h2>Documentation improvements</h2>

<h2>Other significant improvements</h2>

  <ul>
    <li>Location lists are now generated by default when compiling with debug
	info and optimization.  Location lists provide more accurate debug info
	about locations of variables and they allow debugging code compiled
	with <code>-fomit-frame-pointer</code>.</li>
	
	<li id="visibility">The <code>-fvisibility</code> option has
	been added which allows the default ELF visibility of all symbols to be
	set per compilation and the new <code>#pragma GCC visibility</code>
	preprocessor command allows the setting of default ELF visibility for a
	region of code. Using <code>-fvisibility=hidden</code> especially in
	combination with the new <code>-fvisibility-inlines-hidden</code> can
	yield substantial improvements in output binary quality including
	avoiding PLT indirection overheads, reduction of the exported symbol
	count by up to 60% (with resultant improvements to link and load times),
	better scope for the optimizer to improve code and up to a 20% reduction
	in binary size. Using these options correctly yields a binary with a
	similar symbol count to a Windows DLL.<br/>
	Perhaps more importantly, this new feature finally allows (with careful
	planning) complete avoidance of symbol clashes when manually loading
	shared objects with RTLD_GLOBAL, thus finally solving problems many
	projects such as python were forced to use RTLD_LOCAL for (with its
	resulting issues for C++ correctness). You can find more information 
	about using these options at <a
	href="https://gcc.gnu.org/wiki/Visibility">
	https://gcc.gnu.org/wiki/Visibility</a>.</li>
  </ul>

<hr />
<h2 id="GCC4.0.1">GCC 4.0.1</h2>

<p>This is the <a
href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=4.0.1">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 4.0.1 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<h2 id="GCC4.0.2">GCC 4.0.2</h2>

<p>This is the <a
href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=4.0.2">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 4.0.2 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<p>Unfortunately, due to a release engineering failure, this release
has a regression on Solaris that will affect some C++ programs.  We
suggest that Solaris users apply a <a
href="https://gcc.gnu.org/ml/gcc-cvs/2005-09/msg00984.html">patch</a>
that corrects the problem.  Users who do not wish to apply the patch
should explicitly link C++ programs with the <code>-pthreads</code>
option, even if they do not use threads.  This problem has been
corrected in the current 4.0 branch sources and will not be present in
GCC 4.0.3.</p>

<h2 id="GCC4.0.3">GCC 4.0.3</h2>

<p>Starting with this release, the function <code>getcontext</code> is
recognized by the compiler as having the same semantics as the
<code>setjmp</code> function.  In particular, the compiler will ensure
that all registers are dead before calling such a function and will emit
a warning about the variables that may be clobbered after the second
return from the function.</p>

<h2 id="GCC4.0.4">GCC 4.0.4</h2>

<p>This is the <a
href="https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&amp;resolution=FIXED&amp;target_milestone=4.0.4">list
of problem reports (PRs)</a> from GCC's bug tracking system that are
known to be fixed in the 4.0.4 release. This list might not be
complete (that is, it is possible that some PRs that have been fixed
are not listed here).</p>

<p> The 4.0.4 release is provided for those that require a high degree of
binary compatibility with previous 4.0.x releases.  For most users, 
the GCC team recommends that version 4.1.1 or later be used instead." </p>

</body>
</html>
